﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DashBoard.ascx.cs" Inherits="Gollie.Controls.DashBoard" %>
<%@ Register Src="~/Controls/GraphControl.ascx" TagPrefix="uc1" TagName="GraphControl" %>

<asp:Panel ID="Panel1" runat="server">

	<p class="title">Dashboard</p>

    <div style="float:right;">
        <table>
            <tr>
                <td>Uitstaand saldo:</td><td class="dashboardvalue"><asp:Label ID="lblOutstanding" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>Totaal verlopen saldo:</td><td class="dashboardvalue"><asp:Label ID="lblExpired" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>Verlopen saldo deze periode:</td><td class="dashboardvalue"><asp:Label ID="lblPeriodExpired" runat="server"></asp:Label></td>
            </tr>
        </table>
    </div>

    <div style="float:left; margin-right: 128px;">
        <table>
            <tr>
                <td colspan="2" style="text-align:left; font-weight:bold;">Periode</td>
            </tr>
            <tr>
                <td>Van:</td><td><asp:TextBox runat="server" ID="tbDateFrom" CssClass="input-datepicker" ClientIDMode="Static" MaxLength="10" Width="8em"></asp:TextBox></td>
            </tr>
            <tr>
                <td>t/m:</td><td><asp:TextBox runat="server" ID="tbDateTo" CssClass="input-datepicker" ClientIDMode="Static" MaxLength="10" Width="8em"></asp:TextBox></td>
            </tr>
            <tr>
                <td colspan="2" style="text-align:left;"><asp:Button ID="btnPeriod" runat="server" Text="Verstuur"/></td>
            </tr>
        </table>
    </div>
    <div style="float:left;">
        <table>
            <tr>
                <td>Ontvangen:</td><td class="dashboardvalue"><asp:Label ID="lblDeposit" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>Verstrekt:</td><td class="dashboardvalue"><asp:Label ID="lblGiven" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>Verbruikt:</td><td class="dashboardvalue"><asp:Label ID="lblUsed" runat="server"></asp:Label></td>
            </tr>
        </table>
    </div>
<div style="clear:both;"></div>
<hr />
    <br />
    <div style="float: left;">
    <span style="font-weight: bold;">Groeperen per:</span>
       <asp:RadioButtonList ID="rblPeriod" runat="server" RepeatDirection="Horizontal" AutoPostBack="True">
    		<asp:ListItem Value="w">Week</asp:ListItem>
			<asp:ListItem Value="m" Selected="True">Maand</asp:ListItem>
           <asp:ListItem Value="y">Jaar</asp:ListItem>
         </asp:RadioButtonList>
    </div>
    <div style="float:left; margin-left: 64px;">
        <asp:Button ID="btnExportCSV" runat="server" Text="Exporteer naar Excel" OnClick="btnExportCSV_Click"/>
    </div>
    <br />
    <uc1:GraphControl runat="server" ID="GraphControl" />
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" HorizontalAlign="Center" ShowHeaderWhenEmpty="True" Width="100%" AllowSorting="true" OnSorting="GridView1_Sorting">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="Period" HeaderText="Periode" SortExpression="Period">
            <HeaderStyle CssClass="offer-grid-header" />
            <ItemStyle CssClass="offer-grid-cell" />
            </asp:BoundField>
            <asp:BoundField DataField="Deposit" DataFormatString="{0:c}" HeaderText="Ontvangen" SortExpression="Deposit">
            <HeaderStyle CssClass="offer-grid-header" />
            <ItemStyle CssClass="offer-grid-cell" />
            </asp:BoundField>
            <asp:BoundField DataField="Credit" DataFormatString="{0:c}" HeaderText="Verstrekt" SortExpression="Credit">
            <HeaderStyle CssClass="offer-grid-header" />
            <ItemStyle CssClass="offer-grid-cell" />
            </asp:BoundField>
            <asp:BoundField DataField="Used" DataFormatString="{0:c}" HeaderText="Verbruikt" SortExpression="Used">
            <HeaderStyle CssClass="offer-grid-header" />
            <ItemStyle CssClass="offer-grid-cell" />
            </asp:BoundField>
          </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#000000" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#000000" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
</asp:Panel>
